﻿@model AdventureWorks.Entities.ProductModel

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Product Model</legend>

    <div class="display-label">Name</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>

    <div class="display-label">CatalogDescription</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CatalogDescription)
    </div>

    <div class="display-label">ModifiedDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ModifiedDate)
    </div>

	@if (Model.Products.Count > 0)
	{
	 <fieldset>
		<legend>Products</legend>
		@foreach (var product in Model.Products)
		{
			@Html.Partial("DetailProductShort", product)
		}
		</fieldset>
	}
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.ID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
